package com.xxx.rpc.client;

import java.io.IOException;

import com.xxx.rpc.common.bean.RpcRequest;
import com.xxx.rpc.common.bean.RpcResponse;

import io.netty.channel.Channel;

public interface CallBack {

	public void doCallBack(RpcResponse resp);
	
	public void doSendThroughChannel(final Channel channel,final RpcRequest request) throws IOException;
	
	public RpcResponse get(final String requestId);
	
	/**
	 * @param requestId
	 * @param timeout 超时时间  单位 毫秒。 
	 * @return
	 */
	public RpcResponse get(final String requestId,long timeout);
	
	public void destroy();
	
}
